package com.budwk.app.sqfw.services.impl;

import com.budwk.app.sqfw.constants.SqfwCloudBusinessConstants;
import com.budwk.starter.database.service.BaseServiceImpl;
import com.budwk.app.sqfw.models.Sqfw_ImgCallback;
import com.budwk.app.sqfw.services.SqfwImgcallbackService;
import org.nutz.dao.Dao;
import org.nutz.ioc.loader.annotation.IocBean;

@IocBean(args = {"refer:dao"})
public class SqfwImgcallbackServiceImpl extends BaseServiceImpl<Sqfw_ImgCallback> implements SqfwImgcallbackService {
    public SqfwImgcallbackServiceImpl(Dao dao) {
        super(dao);
    }

    @Override
    public String insertByWork(String imageUrl, String text, String userId,String busType,String busId,String resultDetail) {
        Sqfw_ImgCallback imgCallback = new Sqfw_ImgCallback();
        imgCallback.setImgUrl(imageUrl);
        imgCallback.setText(text);
        imgCallback.setCreatedBy(userId);
        imgCallback.setUpdatedBy(userId);
        imgCallback.setBusinessType(busType);
        imgCallback.setBusinessId(busId);
        imgCallback.setResultDetail(resultDetail);
        insert(imgCallback);
        return imgCallback.getId();
    }
}
